﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace dms
{
    public class MyJsonResult
    {
        public bool Success { get; set; } = false;
        public string Msg { get; set; }
        public object Data { get; set; }

        public static MyJsonResult Ok(object data)
        {
            return new MyJsonResult() { Success = true, Data = data };
        }

        public static MyJsonResult Error(string msg)
        {
            return new MyJsonResult() { Msg = msg };
        }
    }
}
